/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hxg.portmgr.core.oper.snmp.oidgroup;

import hxg.portmgr.core.oper.snmp.param.Param;
import org.snmp4j.smi.OID;

/**
 *
 * @author hstel-hxg
 */
public enum SwitchVlanOidEntry implements OidEntry, Param {

    dot1qVlanFdbId(new OID(".1.3.6.1.2.1.17.7.1.4.2.1.3")) {
        @Override
        public String chsname() {
            return "VlanId";
        }

        @Override
        public RemoteValueType remoteValueType() {
            return RemoteValueType.NumberValue;
        }
    },
    dot1qVlanCurrentEgressPorts(new OID(".1.3.6.1.2.1.17.7.1.4.2.1.4")) {
        @Override
        public String chsname() {
            return "TaggedVlan对应接口表";
        }

        @Override
        public RemoteValueType remoteValueType() {
            return RemoteValueType.PortListValue;
        }
    },
    dot1qVlanCurrentUntaggedPorts(new OID(".1.3.6.1.2.1.17.7.1.4.2.1.5")) {
        @Override
        public String chsname() {
            return "UntaggedVlan对应接口表";
        }

        @Override
        public RemoteValueType remoteValueType() {
            return RemoteValueType.PortListValue;
        }
    }, dot1dBasePortIfIndex(new OID(".1.3.6.1.2.1.17.1.4.1.2")) {
        @Override
        public String chsname() {
            return "接口序号和接口索引对应表";
        }

        @Override
        public RemoteValueType remoteValueType() {
            return RemoteValueType.NumberValue;
        }
    };

    private SwitchVlanOidEntry(OID oid) {
        this.oid = oid;
    }

    @Override
    public OID getOID() {
        return oid;
    }

    @Override
    public String oidValue() {
        return oid.toString();
    }

    @Override
    public abstract String chsname();

    @Override
    public String toString() {
        return chsname();
    }

    @Override
    public OID getAppendOID(OID appendOid) {
        return ((OID) oid.clone()).append(appendOid);
    }
    final OID oid;

    @Override
    public Param getParamType() {
        return this;
    }

    @Override
    public String unit() {
        return "";
    }
}
